package com.hqyj.entity;




import javax.persistence.*;

@Entity
@Table(name = "user")
public class User {
    @Id
    private  int id;
    @Column(length = 10)
    private String account;
    @Column(length = 10)
    private String password;
    @Column(length = 10)
    private String name;
    @Column(length = 10)
    private String role_id;
    @Column(length = 10)
    private String sex;
    @Column(length = 20)
    private String phone;

    public User(){}

    public User(int id, String account, String password, String name, String role_id, String sex, String phone) {
        this.id = id;
        this.account = account;
        this.password = password;
        this.name = name;
        this.role_id = role_id;
        this.sex = sex;
        this.phone = phone;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRole_id() {
        return role_id;
    }

    public void setRole_id(String role_id) {
        this.role_id = role_id;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", account='" + account + '\'' +
                ", password='" + password + '\'' +
                ", name='" + name + '\'' +
                ", role_id='" + role_id + '\'' +
                ", sex='" + sex + '\'' +
                ", phone='" + phone + '\'' +
                '}';
    }
}
